<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mytable/jrtable/cc_task.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mytable/jrtable/cc_task.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'cc_task_id',
                footer: "Foots",
                cnName: '集瑞任务管理表',
                name: 'jrtable/cc_task',
                url: "/cc_task/",
                sortName: "rec_datetime"
            });
            const editFormFields = ref({"tc_departname":[],"q_decribe":"","a_decribe":"","tc_ren":"","zeren":"","rec_datetime":"","progress":"","plan_datetime":"","sj_datetime":"","solution":"","attachment_url":""});
            const editFormOptions = ref([[{"dataKey":"oa_depname","data":[],"title":"提出部门","field":"tc_departname","type":"cascader"}],
                              [{"title":"问题描述","field":"q_decribe","colSize":12,"type":"editor"}],
                              [{"title":"进度说明","field":"a_decribe","colSize":12,"type":"editor"}],
                              [{"title":"提出人","field":"tc_ren","type":"text"},
                               {"title":"责任人","field":"zeren","type":"text"}],
                              [{"title":"受理时间","field":"rec_datetime","type":"datetime"},
                               {"dataKey":"progress_step","data":[],"title":"进度(%)","field":"progress","type":"select"}],
                              [{"title":"计划完成","field":"plan_datetime","type":"date"},
                               {"title":"实际完成时间","field":"sj_datetime","type":"date"}],
                              [{"title":"解决方案(文档连接)","field":"solution","colSize":12,"type":"textarea"},
                               {"title":"附件上传路径","field":"attachment_url","type":"file"}]]);
            const searchFormFields = ref({"tc_departname":[],"rec_datetime":"","a_decribe":"","tc_ren":"","zeren":"","progress":[null,null]});
            const searchFormOptions = ref([[{"dataKey":"oa_depname","data":[],"title":"提出部门","field":"tc_departname","type":"cascader"},{"title":"受理时间","field":"rec_datetime","type":"datetime"}],[{"title":"进度说明","field":"a_decribe","type":"like"},{"title":"提出人","field":"tc_ren","type":"like"}],[{"title":"责任人","field":"zeren","type":"like"},{"dataKey":"progress_step","data":[],"title":"进度(%)","field":"progress","type":"range"}]]);
            const columns = ref([{field:'cc_task_id',title:'集瑞任务管理表',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'xuh',title:'序号',type:'int',link:true,width:80,readonly:true,align:'left',sort:true},
                       {field:'tc_departname',title:'提出部门',type:'string',bind:{ key:'oa_depname',data:[]},sort:true,width:100,align:'left'},
                       {field:'q_decribe',title:'问题描述',type:'string',width:220,align:'left'},
                       {field:'rec_datetime',title:'受理时间',type:'datetime',sort:true,width:150,align:'left',sort:true},
                       {field:'a_decribe',title:'进度说明',type:'string',width:220,align:'left'},
                       {field:'tc_ren',title:'提出人',type:'string',sort:true,width:80,align:'left'},
                       {field:'zeren',title:'责任人',type:'string',sort:true,width:80,align:'left'},
                       {field:'progress',title:'进度(%)',type:'int',bind:{ key:'progress_step',data:[]},width:220,hidden:true,align:'left'},
                       {field:'plan_datetime',title:'计划完成',type:'datetime',sort:true,width:100,align:'left',sort:true},
                       {field:'solution',title:'解决方案(文档连接)',type:'string',width:220,align:'left'},
                       {field:'attachment_url',title:'附件上传路径',type:'file',width:110,align:'left'},
                       {field:'sj_datetime',title:'实际完成时间',type:'datetime',width:100,align:'left',sort:true},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'Creator',title:'创建人',type:'string',width:130,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "任务反馈表",
                table: "cc_tasklist",
                columns: [{field:'cc_tasklist_id',title:'任务反馈明细表',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'cc_task_id',title:'cc_task_id',type:'guid',width:110,hidden:true,edit:{type:''},align:'left'},
                       {field:'fk_describe',title:'反馈明细',type:'string',width:220,edit:{type:'editor'},align:'left',sort:true},
                       {field:'fk_datetime',title:'反馈时间',type:'datetime',width:150,edit:{type:'datetime'},align:'left',sort:true},
                       {field:'fk_ren',title:'反馈人',type:'string',width:220,edit:{type:'text'},align:'left'}],
                sortName: "fk_ren",
                key: "cc_tasklist_id"
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
